package com.nari.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SampleController {
	 @RequestMapping("/home")
	    @ResponseBody
	    String home() {
	        return "Hello World!";
	    }
	    
	    @RequestMapping("/redirect")
	    public String page2(Model model){
	        model.addAttribute("hello", "sb");
	        return "hello";
	    }
}
